﻿using System;

namespace TC
{
    public class SetObject<T> : FunctionNode
    {
        public string key;
        public ValueInput<T> value;

        public override void OnCreate()
        {
            base.OnCreate();
            value = this.AddValueInPort<T>("value");
        }

        public override void Execute(Dispatcher chain)
        {
            base.Execute(chain);
            graph.context.AddVariable(key, value.Value);
        }
    }
}
